package com.aji.controller;

import com.aji.entity.Type;
import com.aji.result.Result;
import com.aji.service.TypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "样品类型数据管理")
@RequestMapping("/type")
public class TypeController {

    @Autowired
    private TypeService typeService;

    @ApiOperation("获取 样品类型")
    @GetMapping
    public Result selectType(){
        List<Type> typeList = typeService.selectType();
        return Result.success(typeList);
    }
}
